<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://schemas.datacontract.org/2004/07/XrayService" elementFormDefault="qualified" targetNamespace="http://schemas.datacontract.org/2004/07/XrayService" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:simpleType name="PatientDataMode">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Profile" />
      <xs:enumeration value="Address" />
      <xs:enumeration value="Admission" />
      <xs:enumeration value="Payment" />
      <xs:enumeration value="Custom" />
      <xs:enumeration value="Ward" />
      <xs:enumeration value="OPD" />
      <xs:enumeration value="DischargeDate" />
      <xs:enumeration value="AdmissionDate" />
    </xs:restriction>
  </xs:simpleType>
  <xs:element name="PatientDataMode" nillable="true" type="tns:PatientDataMode" />
  <xs:complexType name="ArrayOfMedtrakPatientData">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="MedtrakPatientData" nillable="true" type="tns:MedtrakPatientData" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="ArrayOfMedtrakPatientData" nillable="true" type="tns:ArrayOfMedtrakPatientData" />
  <xs:complexType name="MedtrakPatientData">
    <xs:sequence>
      <xs:element minOccurs="0" name="AN" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="ANOLD" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Address" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="AdmitDateTime" nillable="true" type="xs:dateTime" />
      <xs:element minOccurs="0" name="AdmitType" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="AmphurID" nillable="true" type="xs:int" />
      <xs:element minOccurs="0" name="AmphurName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="BirthDate" nillable="true" type="xs:dateTime" />
      <xs:element minOccurs="0" name="DataMode" type="tns:PatientDataMode" />
      <xs:element minOccurs="0" name="DischargeDateTime" nillable="true" type="xs:dateTime" />
      <xs:element minOccurs="0" name="FirstName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="HN" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="HospitalMain" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="INSTCode" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="INSTName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="LastName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="MarriageCode" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="MarriageName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="MedtrakRowID" nillable="true" type="xs:int" />
      <xs:element minOccurs="0" name="NationCode" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="NationName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="OCCUPACode" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="OCCUPAName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="PID" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="PaymentID" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="PaymentName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="PhysicianCode" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="PhysicianName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="PhysicianSMCNO" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="ProvinceID" nillable="true" type="xs:int" />
      <xs:element minOccurs="0" name="ProvinceName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Sex" nillable="true" type="xs:unsignedByte" />
      <xs:element minOccurs="0" name="TambonID" nillable="true" type="xs:int" />
      <xs:element minOccurs="0" name="TambonName" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="Title" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="VisitStatus" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="WardID" nillable="true" type="xs:string" />
      <xs:element minOccurs="0" name="WardName" nillable="true" type="xs:string" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="MedtrakPatientData" nillable="true" type="tns:MedtrakPatientData" />
</xs:schema>